<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>陪你</title>
    
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="css/index.css">
	<link rel="stylesheet" type="text/css" href="css/invite-frendes.css">
		<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
	<script type="text/javascript">

	$(function() {
		if ($(window).width()<340) {
			$(".inv-tu-1").css({
				width: '42%'
			});
			$(".inv-tu-2").css({
				width: '48%'
				});
			$(".btn-top").css({
				width:'38%' 
			});
			
			$(".inv-tu-6").css({
				width: '42%'
			});

			$(".inv-tu-8").css({
				width:'20%' 
			})
			$(".btn-bot").css({
				width:'38% '
			})
		}
	});
         // 去下载
        function goDownload() {
            var u = navigator.userAgent, app = navigator.appVersion;
            var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
            var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
            // 这里是安卓浏览器
            //	 是微信内部webView
            if (is_weixn()) {
                window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.jsz.peini'; // 跳应用宝下载地址
            }
            // 是PC端
            if (IsPC()) {
                window.location.href = 'http://app.91peini.com/pnservice/app/1.0.4_pn.apk';  // 公司主页
				//location.href="http://app.91peini.com/pnservice/down.html";
            }else if (isIOS) {
                window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.jsz.peini'; // 跳AppStore下载地址
            }else{
                window.location.href = 'http://app.91peini.com/pnservice/app/1.0.4_pn.apk';  // 公司主页
				//location.href="http://app.91peini.com/pnservice/down.html";
			}
        }
        // 是微信浏览器
        function is_weixn(){
            var ua = navigator.userAgent.toLowerCase();
            if(ua.match(/MicroMessenger/i)=="micromessenger") {
                return true;
            } else {
                return false;
            }
        }
        function IsPC() {
            var userAgentInfo = navigator.userAgent;
            var Agents = ["Android", "iPhone",
                "SymbianOS", "Windows Phone",
                "iPad", "iPod"];
            var flag = true;
            for (var v = 0; v < Agents.length; v++) {
                if (userAgentInfo.indexOf(Agents[v]) > 0) {
                    flag = false;
                    break;
                }
            }
            return flag;
        }

	</script>

</head>
<body >
<section class="invi">
		<div>
			<div class="header">
				<c:choose>
					<c:when test="${userInfo.imageHead != null && userInfo.imageHead != '' }">
						<img src="${sessionScope.imgHost }${userInfo.imageHead}" alt="">
					</c:when>
				</c:choose>
			</div>
			<p class="uid">ID:${userInfo.accCode==null?"-":userInfo.accCode}</p>
			<img src="images/inv-1.png" alt="" class="inv-tu-1">
			<img src="images/inv-2.png" alt="" class="inv-tu-2">
			<button class="btn-top" type="" onclick="goDownload()"></button>
			<img src="images/inv-3.png" alt="" class="inv-tu-3">
			<img src="images/inv-4.png" alt="" class="inv-tu-4">
			<img src="images/inv-5.png" alt="" class="inv-tu-5">
			<img src="images/inv-6.png" alt="" class="inv-tu-6">
			<h5>时光因你而不同</h5>
			<p class="cont">新朋友,我陪你,好玩好用还有好福利!</p>
			<img src="images/inv-logo.png" alt="" class="inv-tu-8">
			<button class="btn-bot" type="" onclick="goDownload()"></button>
		</div>
		
	</section>


  </body>
</html>
